package com.scalar.chiptrack.finance.creditNote.actionCommands;

import com.scalar.chiptrack.commons.Constants;
import com.scalar.chiptrack.actioncommands.ActionCommand;

/**
 * User: Sujan
 * Date: Apr 13, 2007
 * Time: 2:34:46 PM
 */
public class CreditNoteActionCommandFactory implements Constants
{
    private CreditNoteActionCommandFactory()
    {
    }

    public static ActionCommand getActionCommand( String action )
    {
        if ( ACTION_SEARCH.equalsIgnoreCase( action ) )
        {
            return new CreditNoteSearchCommand();
        }
        else if ( ACTION_SEARCH_NEW.equalsIgnoreCase( action ) )
        {
            return new CreditNoteSearchNewCommand();
        }
        else if ( ACTION_NEW.equalsIgnoreCase( action ) )
        {
            return new CreditNoteNewCommand();
        }
        else if ( ACTION_SAVE.equalsIgnoreCase( action ) )
        {
            return new CreditNoteSaveCommand();
        }
        else if ( ACTION_VIEW.equalsIgnoreCase( action ) )
        {
            return new CreditNoteViewCommand();
        }
        else if ( ACTION_MODIFY.equalsIgnoreCase( action ) )
        {
            return new CreditNoteModifyCommand();
        }
        else if ( ACTION_UPDATE.equalsIgnoreCase( action ) )
        {
            return new CreditNoteUpdateCommand();
        }
        else if ( ACTION_APPROVED.equalsIgnoreCase( action ) )
        {
            return new CreditNoteApproveCommand();
        }
        else if ( "confirmApprove".equalsIgnoreCase( action ) )
        {
             return new CreditNoteConfirmApproveCommand();
        }
        return null;
    }
}
